import 'package:flutter/material.dart';
import 'package:xinxuan/common/button_util.dart';
import 'package:xinxuan/controllers/activity_controller/ActivityPageController.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:xinxuan/router/app_routers.dart';
import 'package:xinxuan/utils/color_util.dart';
import 'package:get/get.dart';

class ActivityOldUsers extends StatelessWidget {

  final ActivityPageController controller;

  ActivityOldUsers({
    required this.controller
  });

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Positioned(
          top: 0,
          left: 0,
          child: Image.asset(
            'assets/images/image_activity_banner.png',
            height: 297.h,
            width: 375.w,
            fit: BoxFit.cover,
          )
        ),
        Column(
          children: [
            SizedBox(height: 241.h),
            Container(
              alignment: Alignment.center,
              padding: EdgeInsets.symmetric(horizontal: 12.w),
              child: Container(
                width: 351.w,
                padding: EdgeInsets.all(16.w),
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(5.w),
                  color: bgWhiteColor
                ),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '欢迎参加我们的邀请新用户活动！奖励不设置上限，奖金更丰厚！',
                      textAlign: TextAlign.center,
                      style: TextStyle(
                        color: textBlackColor,
                        fontSize: 14.sp
                      ),
                    ),
                    Container(
                      width: 253.w,
                      margin: EdgeInsets.only(top: 16.h),
                      child: ButtonUtil(
                        text: '邀请新用户', 
                        fontSize: 14.sp, 
                        borderRadius: 36.h, 
                        height: 36.h, 
                        onTop: () {
                          Get.toNamed('${AppRouters.COMMON_PAGE}${AppRouters.INVITATION_POSTER_PAGE}');
                        }
                      ),
                    )
                  ],
                ),
              ),
            ),
          ],
        ),
      ],
    );
  }
}